import request from "../utils/request";
// 模拟创建订单
export function createOrders(data: any) {
  return request({
    url: "/robot/addOrder",
    method: "post",
    data,
  });
}
//查看订单详情
export function queryOrdersDetails(params: any) {
  return request({
    url: "/robot/selectOrder",
    method: "get",
    params,
  });
}
//192.168.47.1:8081/robot/selectOrder?orderId=000C69BB39674CAD877D4A893D909404
// /robot/selectOrder

// 创建订单
export function createOrder(data: any) {
  return request({
    url: "/openapi/order/createOrder",
    method: "post",
    data,
  });
}
// 创建商品
export function createProduct(data: any) {
  return request({
    url: "/openapi/commodity/create",
    method: "post",
    data,
  });
}
//设备列表
export function addDeviceList(params: any) {
  return request({
    url: `/openapi/equipment/getEquipmentPageList`,
    method: "get",
    params,
  });
}
//设备物料
export function addDeviceMaterial(params: any) {
  return request({
    url: `/openapi/equipment/getMaterials/${params.equipmentId}`,
    method: "get",
    params,
  });
}
//查询商品列表
export function queryList(params: any) {
  return request({
    url: `/openapi/commodity/getCommoditySkuPageList`,
    method: "get",
    params,
  });
}
